// EcoModeler - C# Edition :: Version 9.16 build 3301
using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using Eco.Services;
using Eco.ObjectRepresentation;
using Eco.ObjectImplementation;
using Eco.UmlRt;
using Eco.UmlCodeAttributes;
using Eco.Subscription;

namespace TTServer
{
	#region MM_ECO_Generated
	#region Attributes
	[UmlElement(Id="{6da775ee-cb0a-40ce-8131-d0ace1ff6bc9}")]
	#endregion

	#endregion
	public class Klasse: object, ILoopBack
	{
		#region MM_ECO AutoGenerated ECO code

		protected IContent eco_Content;

		IObject IObjectProvider.AsIObject()
		{
			return this.eco_Content.AsIObject();
		}

		public IObjectInstance AsIObject()
		{
			return this.eco_Content.AsIObject();
		}

		public struct Eco_LoopbackIndices
		{
			public const int Eco_FirstMember = 0;
			public const int Eco_MemberCount = (Eco_FirstMember + 16);
			public const int Artikel_MemberIndex = Eco_FirstMember + 0;
			public const int ErgebnisdienstURL_MemberIndex = Eco_FirstMember + 1;
			public const int Halbrunde_MemberIndex = Eco_FirstMember + 2;
			public const int HoehereKlasse_MemberIndex = Eco_FirstMember + 3;
			public const int Mannschaft_MemberIndex = Eco_FirstMember + 4;
			public const int KlassenZusammensetzung_MemberIndex = Eco_FirstMember + 5;
			public const int Name_MemberIndex = Eco_FirstMember + 6;
			public const int Rahmenterminplan_MemberIndex = Eco_FirstMember + 7;
			public const int Spiel_MemberIndex = Eco_FirstMember + 8;
			public const int Spieldimension_MemberIndex = Eco_FirstMember + 9;
			public const int Spielsystem_MemberIndex = Eco_FirstMember + 10;
			public const int SystemAnzahlMannschaften_MemberIndex = Eco_FirstMember + 11;
			public const int TiefereKlassen_MemberIndex = Eco_FirstMember + 12;
			public const int WebEinstellungen_MemberIndex = Eco_FirstMember + 13;
			public const int WebEinstellungen1_MemberIndex = Eco_FirstMember + 14;
			public const int WirdGeleitetVon_MemberIndex = Eco_FirstMember + 15;
		}

		public virtual object get_MemberByIndex(int index)
		{
			switch (index)
			{
				default: throw new System.IndexOutOfRangeException();
			}
		}

		public virtual void set_MemberByIndex(int index, object value)
		{
			switch (index)
			{
				default: throw new System.IndexOutOfRangeException();
			}
		}

		protected void Initialize(IEcoServiceProvider serviceProvider)
		{
			if ((this.eco_Content == null))
			{
				IInternalObjectContentFactory factory = ((IInternalObjectContentFactory)(serviceProvider.GetEcoService(typeof(IInternalObjectContentFactory))));
				this.eco_Content = factory.CreateContent(this);
				this.eco_Content.LoopbackValid();
			}
		}

		protected void Deinitialize(IEcoServiceProvider serviceProvider)
		{
			if ((this.eco_Content != null))
			{
				IInternalObjectContentFactory factory = ((IInternalObjectContentFactory)(serviceProvider.GetEcoService(typeof(IInternalObjectContentFactory))));
				factory.CreateContentFailed(this.eco_Content, this);
				this.eco_Content = null;
			}
		}

		public IEcoList<KlassenZusammensetzung> KlassenZusammensetzung
		{
			get
			{
				return new ObjectListAdapter<KlassenZusammensetzung>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.KlassenZusammensetzung_MemberIndex)));
			}
		}
		#endregion

		#region MM_ECO Model owned attributes
		//Note: Do not remove any property within this region, nor change its signature

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.Mannschaft_MemberIndex), Id="{7dc0ec10-f7ea-44e1-8c3d-5bdeb6c9710b}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.KlassenZusammensetzung), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Mannschaft> Mannschaft
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Mannschaft>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Mannschaft_MemberIndex)));
				#endregion
			}
		}


		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.Spielsystem_MemberIndex), Id="{44998247-459b-4a03-864e-ab8b469841ab}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.SpielsystemKlasse), Index=0)]
		[UmlMetaAttribute("multiplicity", "1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.Spielsystem Spielsystem
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.Spielsystem) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Spielsystem_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Spielsystem_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.WirdGeleitetVon_MemberIndex), Id="{9e74cbc4-566f-4daf-8eb6-19c29f5cdb8e}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.Klassenleiter), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.Person WirdGeleitetVon
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.Person) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.WirdGeleitetVon_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.WirdGeleitetVon_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.Rahmenterminplan_MemberIndex), Id="{668baa14-81ed-4495-8547-d9d70b1d818e}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.KlasseRahmenterminplan), Index=1)]
		[UmlMetaAttribute("multiplicity", "1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.Rahmenterminplan Rahmenterminplan
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.Rahmenterminplan) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Rahmenterminplan_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Rahmenterminplan_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		#region Attributes
		[UmlElement(Index=(Klasse.Eco_LoopbackIndices.ErgebnisdienstURL_MemberIndex), Id="{b6245152-e066-411d-b72d-1b4a2b6c01c4}")]
		[UmlTaggedValue("Eco.Length", "255")]
		#endregion

		#region Documentation
		//1 URL zu externem Ergebnisdienst
		/// URL zu externem Ergebnisdienst
		#endregion

		#endregion
		public string ErgebnisdienstURL
		{
			get
			{
				#region MM_ECO_Generated
				return (string) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.ErgebnisdienstURL_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.ErgebnisdienstURL_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.Halbrunde_MemberIndex), Id="{299cace5-f585-4400-8fd4-ccc06d3534f5}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.KlassenstrukturHalbrunde), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Halbrunde> Halbrunde
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Halbrunde>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Halbrunde_MemberIndex)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.HoehereKlasse_MemberIndex), Id="{d0108f33-6b26-41d7-8c48-2b7439a01579}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.KlassenstrukturKlassenstruktur), Index=0)]
		[UmlMetaAttribute("multiplicity", "0..1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.Klasse HoehereKlasse
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.Klasse) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.HoehereKlasse_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.HoehereKlasse_MemberIndex, ((object)(value)));
				#endregion
			}
		}


		#region MM_ECO_Generated
		#region Attributes
		[UmlElement(Index=(Klasse.Eco_LoopbackIndices.Name_MemberIndex), Id="{9227dca3-e5e7-4607-86b3-1a45d9424c1d}")]
		[UmlTaggedValue("Eco.Length", "255")]
		#endregion

		#region Documentation
		//1 Name der Klasse in der Klassenstruktur
		#endregion

		#endregion
		public string Name
		{
			get
			{
				#region MM_ECO_Generated
				return (string) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Name_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Name_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.TiefereKlassen_MemberIndex), Id="{73832c30-4f0b-4bb2-9f63-c96be4f2dbf0}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.KlassenstrukturKlassenstruktur), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Klasse> TiefereKlassen
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Klasse>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.TiefereKlassen_MemberIndex)));
				#endregion
			}
		}


		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.Spiel_MemberIndex), Id="{ce4d63b8-aae0-44b3-a899-52369f10a500}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.KlasseSpiel), Index=1)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Spiel> Spiel
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Spiel>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Spiel_MemberIndex)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.Artikel_MemberIndex), Id="{d859253e-b1b7-4fa1-a7fb-e11777b9300f}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.ArtikelKlasse), Index=0)]
		[UmlMetaAttribute("multiplicity", "0..*")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public IEcoList<Artikel> Artikel
		{
			get
			{
				#region MM_ECO_Generated
				return new ObjectListAdapter<Artikel>((IList) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Artikel_MemberIndex)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.WebEinstellungen_MemberIndex), Id="{c609bc04-2200-4be0-8f2e-b6d75edb8b8f}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.WebEinstellungenErgebnis), Index=0)]
		[UmlMetaAttribute("multiplicity", "0..1")]
		[UmlTaggedValue("Eco.Embed", "False")]
		#endregion
		public TTServer.WebEinstellungen WebEinstellungen
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.WebEinstellungen) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.WebEinstellungen_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.WebEinstellungen_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.WebEinstellungen1_MemberIndex), Id="{31bacc41-a029-421b-93b8-354cb0d08707}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.WebEinstellungenKlasse), Index=0)]
		[UmlMetaAttribute("multiplicity", "0..1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.WebEinstellungen WebEinstellungen1
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.WebEinstellungen) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.WebEinstellungen1_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.WebEinstellungen1_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		#region Attributes
		[UmlElement(Index=(Klasse.Eco_LoopbackIndices.SystemAnzahlMannschaften_MemberIndex), Id="{86f679cf-b879-4899-9003-dee1002a00d1}")]
		[UmlTaggedValue("Eco.Length", "255")]
		#endregion

		#region Documentation
		//1 Anzahl der Mannschaften im System
		/// Anzahl der Mannschaften im System
		#endregion

		#endregion
		public int SystemAnzahlMannschaften
		{
			get
			{
				#region MM_ECO_Generated
				return (int) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.SystemAnzahlMannschaften_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.SystemAnzahlMannschaften_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Klasse.Eco_LoopbackIndices.Spieldimension_MemberIndex), Id="{5eb66658-d26b-4137-bdf4-959f1236c91e}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.SpieldimensionKlasse), Index=0)]
		[UmlMetaAttribute("multiplicity", "1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.Spieldimension Spieldimension
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.Spieldimension) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Spieldimension_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Spieldimension_MemberIndex, ((object)(value)));
				#endregion
			}
		}
		#endregion

		#region MM_ECO Model owned methods
		//Note: Do not remove any method within this region, nor change its signature

		public Klasse(IContent content)
		{
			#region MM_ECO_Generated
			this.eco_Content = content;
			content.AssertLoopbackUnassigned();
			#endregion
		}

		public Klasse(IEcoServiceProvider serviceProvider)
		{
			this.Initialize(serviceProvider);
			try
			{
				// Place user code ONLY here
			}
			catch (System.Exception)
			{
				this.Deinitialize(serviceProvider);
				throw;
			}
		}
		#endregion
	}
}
